package org.dcma.client.forms;

import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
import com.extjs.gxt.ui.client.widget.form.DateField;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FormData;
import com.google.gwt.user.client.Element;



public class FrmDatosProceso extends LayoutContainer {

	 private VerticalPanel vp;  
	   
	   private FormData formData;  
	   
	   @Override  
	   protected void onRender(Element parent, int index) {  
	     super.onRender(parent, index);  
	     formData = new FormData("-20");  
	     vp = new VerticalPanel();  
	     vp.setSpacing(0);  
	     createForm();  	       
	     add(vp);  
	   }

	private void createForm() {
		 FormPanel simple = new FormPanel();  
		  simple.setHeading("Datos del Proceso");  
	      simple.setFrame(true);  
	      simple.setWidth(440);   
	      
	     TextField<String> firstName = new TextField<String>();  
	     firstName.setFieldLabel("Numero");  
	     firstName.setAllowBlank(false);  
	     simple.add(firstName, formData);  
		
		 DateField date = new DateField();  
	     date.setFieldLabel("Fecha Inicio");  
	     simple.add(date, formData);  
	     
		
	     vp.add(simple);
	}  
}
